package com.zy.ooptest16;

import com.zy.aip.Stu;

import java.util.Scanner;

/**
 * @Author GongXL
 * @Description 人的对象类
 * @dATE 2021/11/16 14:54
 **/
public class Test {
    /**
     * @Author GongXL
     * @Description //TODO 
     * @Date 15:13 2021/11/16
     * @Param [java.lang.String[]]
     * @return void
     **/
    public static void main(String[] args) {
//      String username= "abcc";
//      String pas= "abc";
        System.out.println("请输入名");
        Scanner sc = new Scanner(System.in);
        String username = sc.next();
        if(username .equals("a")){
            System.out.println("请输密码");
        }
//        System.out.println(next);

        String pas = sc.next();
        if(null != username && !username.equals("") && username.equals("abc") ){
          if(null != pas && pas.equals("abc")){
              System.out.println("登录成功");
          }else{
              System.out.println("密码不对");
          }

      }else{
          System.out.println("账户不对");
      }
    }
    /**
     * @Author GongXL
     * @Description //判断数据类型输出不同内容
     * @Date 15:57 2021/11/16
     * @Param [com.zy.ooptest16.Person]
     * @return void
     **/
    void method1(Person e){
        if(e instanceof Person){
            System.out.println("a person");
        }
        if(e instanceof Student){
            System.out.println("a student");
        }
        if(e instanceof Graduate){
            System.out.println("a a graduated student");
        }
//        System.out.println(e.getInfo());
    }
}
